import { Space, Button, Form, Input, Select } from 'antd';

const Search = ({ form, onFinish, reset }: any) => {
  return (
    <Form
      form={form}
      name="horizontal_login"
      layout="inline"
      onFinish={onFinish}
    >
      <Form.Item name="name" label="姓名">
        <Input placeholder="Username" />
      </Form.Item>
      <Form.Item name="sex" label="性别">
        <Select style={{ width: 120 }} allowClear>
          <Select.Option value="1">男</Select.Option>
          <Select.Option value="2">女</Select.Option>
        </Select>
      </Form.Item>
      <Form.Item>
        <Space>
          <Button type="primary" htmlType="submit">
            搜索
          </Button>
          <Button onClick={reset}>重置</Button>
        </Space>
      </Form.Item>
    </Form>
  );
};

export default Search;
